package com.example.storm.config;

import com.example.storm.storm.Topology;
import com.example.storm.util.SpringBeanUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class TopologyRunner implements CommandLineRunner {
    @Override
    public void run(String... args) throws Exception {
        log.info("TopologyRunner.run 准备启动--------");
        Topology app = SpringBeanUtil.getBean(Topology.class);
        app.runStorm(args);
        log.info("TopologyRunner.run 启动完成--------");
    }
}
